import requests from '@/api/request'
//管理员界面的接口api
let urlmethods={};
//获取所有待审批的账号
const getaccount=()=>{
    return requests.get('/getaccount');
}
urlmethods.getaccount=getaccount;
//获取所有待审批的课程申请
const getcourse=()=>{
    return requests.get('/getcourse');
}
//同意教师账号审批
const accept=(data)=>{
    return requests.post('/accountaccept',data);
}
//同意课程审批
const acceptcourse=(data)=>{
    return requests.post('/courseaccept',data);
}
//拒绝审批
const reject=(data)=>{
    return requests.post('/accountreject',data);
}
//拒绝课程审批
const coursereject=(data)=>{
    return requests.post('/coursereject',data);
}
//根据姓名查询教师账号
const gettchaccbyname=(name)=>{
    return requests.post('/gettchaccbyname',name);
}
//根据课程名称查询课程申请
const getcoursebyname=(name)=>{
    return requests.post('/getcoursebyname',name);
}
//修改公告
const editpub=(pubdata)=>{
    return requests.post('/editpub',pubdata);
}
//获取学生账号
const getstuacc=()=>{
    return requests.get('/getstuacc');
}
//删除学生账号
const stuaccdelete=(data)=>{
    return requests.post('/deletestuacc',data);
}
//获取课程信息
const getallcourse=()=>{
    return requests.get('/getallcourse');
}
//根据学生姓名查找账号
const getstubyname=(name)=>{
    return requests.post('/getstubyname',name);
}
//删除课程
const coursedelete=(data)=>{
    return requests.post('/deletecourse',data);
}
//根据课程名称查询课程
const getallcoursebyname=(data)=>{
    return requests.post('/getallcoursebyname',data);
}
urlmethods.getallcoursebyname=getallcoursebyname;
urlmethods.coursedelete=coursedelete;
urlmethods.getstubyname=getstubyname;
urlmethods.getallcourse=getallcourse;
urlmethods.stuaccdelete=stuaccdelete;
urlmethods.getstuacc=getstuacc;
urlmethods.editpub=editpub;
urlmethods.getcoursebyname=getcoursebyname;
urlmethods.coursereject=coursereject;
urlmethods.acceptcourse=acceptcourse;
urlmethods.getcourse=getcourse;
urlmethods.reject=reject;
urlmethods.gettchaccbyname=gettchaccbyname;
urlmethods.accept=accept;
export default urlmethods;